Precise control of the output of an electronic device is useful for many applications. For example, precise control of the output frequency of an oscillator, such as a voltage-controlled crystal oscillator (VCXO) or oven-controlled crystal oscillator (OCXO), may be useful to maintain a strong phase lock to a highly accurate external time reference, such as a Global Positioning System (GPS) reference, at a network device. This phase locking can help to enable real-time applications and services such as Pseudo-Wire Emulation (PWE), Voice over IP (VoIP), video conferencing, and streaming services, which may require highly accurate timing across multiple network devices to ensure high service quality.
The output of an electronic device, such as the output frequency of a VCXO, is a function of a control voltage applied to the device and environmental factors. In the case of a VCXO, these environmental factors may include ambient temperature, altitude, humidity, acceleration experienced by the oscillator, and age of the oscillator. The impact of these environmental factors on the output of an oscillator may be determined by calibrating the oscillator and/or a population of oscillators with the same design against a highly accurate frequency reference, such as a rubidium oscillator locked to the Global Positioning System (GPS). The result of this calibration may be lookup tables and/or curve fit approximations relating oscillator output frequency to control voltage for a range of values of the environmental factors.
Based on measured values of environmental factors such as temperature and age, the desired control voltage to be applied to an electronic device such as a VCXO may be interpolated from the lookup tables and/or calculated from the fitted curves. This interpolation may be performed by a processing module, such as a central processing unit (CPU), programmable logic, or customized hardware such as an application specific integrated circuit (ASIC). However, the digital output of the processing module may need to be converted to the desired control voltage using a digital-to-analog converter (DAC). An N-bit DAC typically has an output voltage that corresponds to each N-bit digital input value, where this correspondence may be defined in one or more lookup tables that may vary based on environmental factors such as ambient temperature. The desired control voltage of the electronic device is typically specified to a greater precision than is attainable by selecting a DAC output voltage corresponding to one of the N-bit digital input values. Setting the DAC input to the N-bit digital input value with a corresponding DAC output voltage nearest to the desired control voltage of the electronic device may not result in good long-term system performance. For example, the application of the nearest DAC output voltage to the desired control voltage of a VCXO results in an output frequency offset from the desired output frequency of the VCXO, and therefore results in an accumulating phase error as long as this offset remains.
One approach to reduce this frequency offset and the corresponding accumulated phase error may be to modulate the least significant bit (LSB) of a given N-bit DAC input on and off, using Pulse Width Modulation (PWM). Conceptually, the goal of PWM is to effectively increase the resolution of the DAC through modulation of the LSB, and correspondingly the control resolution of the electronic device, so that the control voltage applied to the electronic device is in some sense a weighted average of the DAC output voltages corresponding to the given N-bit DAC input with the LSB on and off. PWM may control the duty cycle of the LSB of the N-bit DAC input so that the desired number, U, of “ones” are consecutively followed by X-U “zeroes”, where X refers to the number of update clock cycles in an update period, or LSB modulation period, and U refers to a number of update clock cycles less than or equal to X. The DAC output voltage then may vary as a function of the N-bit DAC input, such as by assuming one value when the LSB is “one” and another value when the LSB is “zero”.
The effect of PWM on the output of the electronic device that takes the DAC output voltage as its input may depend on the characteristics of that device. For example, electronic devices such as VCXOs may be approximately modeled as the combination of a low pass frequency response and a mapping of an input voltage to an output frequency. The input control voltage used to obtain the output frequency, instead of being the DAC output voltage, may therefore be a low pass filtered, or integrated, DAC output voltage. The input control voltage obtained using PWM may be closer to the desired control voltage than the input control voltage without PWM.
However, the PWM approach may not result in desirable system performance. The problem is that the long strings of U “ones” and X-U “zeroes” generated by PWM can result in substantial fluctuations in the input control voltage away from the desired control voltage. These fluctuations in the input control voltage may result in significant and repetitive variations in the output frequency of the electronic device away from the desired output frequency, which may degrade the performance of real-time applications and services.
To address this shortcoming, it would be desirable to provide a modulation approach that can effectively increase the resolution of the DAC, and correspondingly the control resolution of the electronic device, without creating the long strings of “ones” and “zeroes” that can result in large ripples in the input control voltage.